package com.shr.code_interview;

public class Solution_66 {
    public int[] multiply(int[] A) {
		int b[] = new int[A.length] ;
		b[0] = A[0] ;
		for(int i = 1; i<b.length;i++){
			b[i] = A[i] * b[i-1] ;
		}
		int temp = 1 ;
		for(int i = b.length - 1;i>0;i--){
			b[i] = b[i-1] * temp ;
			temp *= A[i] ;
		}
		b[0] = temp;
		return b ;
    }
}
